#include "Date.h"

Date::Date(): year(0), month(0), day(0), hour(0), minute(0), second(0)
{
}

Date::~Date()
{
}

Date::Date(const Date& rhs): year(rhs.year), month(rhs.month), day(rhs.day), hour(rhs.hour), minute(rhs.minute), second(rhs.second)
{
}

void Date::CheckRange(int val, int min, int max)
{
	if (val < min || val > max)
		throw "Date: Invalid range";
}


const char *Date::MonthString() const
{
	switch(month)
	{
		case 1:
			return "Jan";
		case 2:
			return "Feb";
		case 3:
			return "Mar";
		case 4:
			return "Apr";
		case 5:
			return "May";
		case 6:
			return "Jun";
		case 7:
			return "Jul";
		case 8:
			return "Aug";
		case 9:
			return "Sep";
		case 10:
			return "Oct";
		case 11:
			return "Nov";
		case 12:
			return "Dec";
	}

	return "Unknown";
}